/**
 * Error log in the popup
 */
.popup {
    .error-log {
        strong {
            color: var(--warning);
            font-size: $app-font-base;
            font-weight: normal;
        }

        pre {
            background: rgba(0, 0, 0, .025);
            border: 1px solid var(--gray-1);
            color: var(--gray-4);
            font-size: 1.2rem;
            padding: .5rem 1rem;
            white-space: pre-wrap;
            word-break: break-all;
        }
    }
}

/**
 * vue-multiselect
 */
.multiselect__tags {
   // padding: 0 4rem .5rem 0.5rem;

    &-wrap {
        display: inline;
    }
}

.multiselect__tag {
    background: var(--input-border-color);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-primary-color);
    display: inline-block;
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 400;
    margin: .5rem .5rem 0 0;
    padding: 7px 10px;
    vertical-align: middle;

    & > span {
        display: inline-block;
        height: 2.4rem;
        line-height: 2.4rem;
    }

    &-icon {
        cursor: pointer;
        display: inline-block;
        float: left;
        font-size: $app-font-base;
        font-weight: bold;
        margin-left: 0;
        margin-right: 5px;
        position: static;
        width: 10px;

        &:after {
            color: var(--icon-secondary-color)!important;
        }

        &:focus,
        &:hover {
            background: transparent;

            &:after {
                color: var(--icon-tertiary-color)!important;
            }
        }
    }
}

.multiselect__input {
    height: 47px;
    line-height: 47px;
    margin-top: .75rem;
}

.multiselect__select {
    top: 1px;
    padding: 4px 6px 4px 0;

    &:before {
        border-color: var(--icon-secondary-color) transparent transparent;
        border-width: 6px 5px;
    }
}

.multiselect__option--selected {
    color: var(--text-primary-color);
    font-weight: 600;
}

/**
 * Number fields in theme settings
 */
.theme-settings {
    fieldset:first-of-type {
        .field {
            .input-wrapper.is-number {
                width: 100%!important;
            }
        }
    }

    .footer {
        .buttons {
            float: none;
            width: 100%;

            .button-outline {
                float: left!important;
                margin-left: 0!important;
            }
        }
    }
}

/**
 * Field TinyMCE
 */

.field {
    .mce-tinymce {
        border: 1px solid var(--input-border-color);
        border-radius: var(--border-radius);
    }

    .mce-toolbar-grp {
        padding: 1rem;
    }

    .mce-panel {
        background: transparent;

        .mce-btn {
            background: transparent;
            border: none;

            button {
                padding: .4rem .5rem;

                &:hover {
                    background: var(--gray-1);
                }
            }
        }
    }
}

/**
 * Source code editor
 */

.source-code-editor {
    .CodeMirror {
        min-height: calc(100vh - 10rem); 
    }

    .CodeMirror-advanced-dialog + .CodeMirror-wrap {
        padding-bottom: 103px;
    }
}

body[data-os="linux"] {
    .source-code-editor {        
        .CodeMirror {
            min-height: calc(100vh - 8rem);
        }
    }
}

/**
 * Link add/edit popup
 */
.popup-link-add {
    .field {
        label {
            font-size: $app-font-base;
            padding: 0;
            text-align: left;
            vertical-align: middle;
            width: 16rem!important;
        }
    }

    .multiselect__tags {
        min-height: 5rem;
        padding: 0 4rem 0 2rem;
    }

    .multiselect__single {
        line-height: 4.8rem;
    }
}

/**
 * Improved layout of v-select on site settings
 */
.site-settings {
    .multiselect__tags {
        min-height: 48px;
    }
}

/**
 * Improved layout of v-select for long items
 */

.multiselect__tags {
    .multiselect__single,
    .multiselect__option {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.multiselect__content {
    width: 100%;

    .multiselect__option {
        white-space: normal;
    }
}
